Implement fallback search logic when ICU is unavailable#297
Conversation
Meanwhile you delivered two of the most outstanding PRs this project has received so far. Don't get impostor syndrome! 😅 FYI: I'll try to first review and merge #255 before merging this PR, unless you'd like to prioritize this PR. |
|
HI @lhecker , Do you have any timeline when this PR will be applied to master branch. It help me to use this editor without icu support on older embedded linux platform and it works. It would be good to have this in official release. In attachments you can find patch I use with latest master code. I just adopted existing patch to latest master. Regards, Primoz |
|
I still like this PR a lot, I'm just not sure if we should go this direction or not. I'm not actually particularly happy about depending on ICU, because it makes packaging/portability annoying. Simultaneously, the Rust ecosystem has this tendency of trying to solve problems "correctly". So now we got Unicode-correct, vectorized regex crates that are 1MB large, but no reputable ones that just provide a decent version of "re1". Maybe https://github.com/ridiculousfish/regress would be a good (new) choice. I really like its clean implementation (not surprising given who wrote it). Edit: Nvm, it expects |
Closes #172
Demo:
2025-05-26.21-08-44.mp4
This pr introduces a fallback Boyer–Moore–Horspool algorithm used for searching the buffer when the ICU library fails to load.
The implementation is working, however since I'm still getting used to writing rust and the time I can devote is quite limited the code probably needs some polishing (maybe better structuring is needed to reuse as much as possible between the ICU and non-ICU search operations).
Anyways I guess it is a good foundation to iterate on.